#!/usr/bin/env bash
# Copyright (c) 2021 The Toltec Contributors
# SPDX-License-Identifier: MIT

pkgnames=(appmarkable)
pkgdesc="Front-end for apps that do not have a graphical user interface"
url="https://github.com/LinusCDE/appmarkable"
pkgver=0.1.3-1
timestamp=2024-06-01T21:00Z
section="devel"
maintainer="Linus K. <linus@cosmos-ink.net>"
license=MIT
installdepends=(display)
flags=(patch_rm2fb)

image=rust:v3.1
source=(https://github.com/LinusCDE/appmarkable/archive/0463ffc5bdaf29ff0a0e92fb15a90b06e310c417.zip)
sha256sums=(bb45ed03a360f1a58e58e5a8e3176008e8e63053fc46925d20be92b532a02822)

build() {
    # Fall back to system-wide config
    rm .cargo/config
    cargo build --release --bin appmarkable
}

package() {
    install -D -m 755 -t "$pkgdir"/opt/bin \
        "$srcdir"/target/armv7-unknown-linux-gnueabihf/release/appmarkable
}
